<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../js/vue.global.js"></script>
    
    <title>Document</title>
</head>
<body>
    <div id = "root">
        <h1>{{cnt}}</h1>
        <h1 v-big="cnt"></h1>
        <button @click="add">add</button>
    </div>

    <script>
        const app = {
            data(){
                return {
                    cnt: 1
                }
            },
            methods:{
                add(){
                    this.cnt++;
                }
            },
            directives:{
                big(element,binding){
                    element.innerText = binding.value*10;
                }
            }
        }

        Vue.createApp(app).mount("#root");
    </script>
</body>
</html>